fix: [OTLP] detect http/https protocol from parsedUrl.protocol#9028
Conversation
Overall package sizeSelf size: 6.34 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔗 Commit SHA: b465d1f | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-06-25 18:26:00 Comparing candidate commit b465d1f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1950 metrics, 15 unstable metrics.
|
…se.js Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM while it would be nice to have a test case for the telemetry tags being updated
thanks Ruben! just added the test cases |
| it('sets protocol:http tag for http:// endpoint', () => { | ||
| const exporter = new OtlpHttpTraceExporter('http://collector.example/v1/traces', {}, 1000, {}) | ||
|
|
||
| assert.ok(exporter.telemetryTags.includes('protocol:http')) |
There was a problem hiding this comment.
Nit: calling setUrl here with https afterwards would be great. Everything would be tested in that case :)
Because that was the last functionality that was missing with my earlier comment
* detect http/https protocol from prasedUrl.protocol * privatize the attribute this.transport * fix ci failures * fall back on https * Update packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de> * added telemetry test cases --------- Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
What does this PR do?
As title, ensures https payloads are encrypted
Motivation
Additional Notes